-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#66 [feat] 유저별 데일리루틴 리스트 조회 api 연결 #69
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
서버 처음이라 어려웠을텐데 고생했어요!
private val dailyRoutineDataSource: DailyRoutineDataSource | ||
) : DailyRoutineRepository { | ||
override suspend fun getDailyRoutine(): Result<List<DailyRoutine>> = | ||
runCatching { dailyRoutineDataSource.getDailyRoutine() }.mapCatching { response -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mapCatching을 쓰셨군요! 👍
https://medium.com/harrythegreat/kotlin-runcatching%EA%B3%BC-result-%ED%83%80%EC%9E%85-ab261f47efa8
map과 mapCatching의 차이입니다~ 혹시나 하여 남기고 가요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아하 정독해보겠습니다!
Timber.d("뷰모델 서버 성공") | ||
} | ||
.onFailure { throwable -> | ||
Timber.d("뷰모델 서버 실패") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
삭제 부탁드립니다~
…roid into feature/#66-daily-routine-user-api # Conflicts: # app/src/main/java/com/sopetit/softie/data/repositoryImpl/DailyRoutineRepositoryImpl.kt # app/src/main/java/com/sopetit/softie/data/service/DailyRoutineService.kt # app/src/main/java/com/sopetit/softie/data/source/DailyRoutineDataSource.kt # app/src/main/java/com/sopetit/softie/di/RepositoryModule.kt # app/src/main/java/com/sopetit/softie/di/RetrofitServiceModule.kt # app/src/main/java/com/sopetit/softie/domain/repository/DailyRoutineRepository.kt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
서버 통신 수고하셨습니당
import javax.inject.Inject | ||
|
||
class DeleteDailyRoutineUseCase @Inject constructor( | ||
private val deleteDailyRoutine: DailyRoutineRepository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 부분 변수 크게 상관은 없지만 dailyRoutineRespository 이런 식으로 repository를 받아온다는 걸 명확하게 하면 좀 더 좋을 것 같습니당
private fun achieveRoutine() { | ||
viewModel.isRoutineAchieveFirst.observe(viewLifecycleOwner) { | ||
} | ||
viewModel.isRoutineAchieveSecond.observe(viewLifecycleOwner) { | ||
} | ||
viewModel.isRoutineAchieveThird.observe(viewLifecycleOwner) { | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 부분 함수는 왜 만들어 두신 건가요...??
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
서버와 연결되어 기쁩니다
|
||
override suspend fun postAddDailyRoutine(routineId: Int): Result<AddRoutine> = | ||
runCatching { | ||
dailyRoutineDataSource.postAddDailyRoutine(routineId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it대신 response로 그 위치를 명시해주라는 리드님의 말씀을 잘 지켰네요!
viewModel.isRoutineAchieveFirst.observe(viewLifecycleOwner) { | ||
} | ||
viewModel.isRoutineAchieveSecond.observe(viewLifecycleOwner) { | ||
} | ||
viewModel.isRoutineAchieveThird.observe(viewLifecycleOwner) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요거는 왜 있나요~?
📑 Work Description
🛠️ Issue
📷 Screenshot
Screen_recording_20240118_053912.mp4
💬 To Reviewers